package io.file;

import org.junit.Test;

import java.io.File;
import java.io.IOException;

/**
 * @author mubei
 * @date 2021/12/2
 * @description
 */
public class FileInformation {


    // 获取文件的信息
  @Test()
  public void test1() {
      String parentPath = "D:\\date\\distable\\practice\\code\\basic\\src\\main\\java\\io\\file";
      String path = "demo03.txt";
      File file = new File(parentPath,path);

      //
      System.out.println(file.getName());

      if(file.exists()) {
          file.delete();
      }
  }
}
